import { request } from '@/utils/request'

// 查询车辆保养列表
export function listCarMaintain(query) {
  return request({
    url: '/system/carMaintain/list',
    method: 'get',
    params: query
  })
}

// 查询车辆保养列表
export function listNeedMaintain(query) {
  return request({
    url: '/system/carMaintain/needMaintainList',
    method: 'get',
    params: query
  })
}

// 查询车辆保养详细
export function getCarMaintain(id) {
  return request({
    url: '/system/carMaintain/' + id,
    method: 'get'
  })
}

// 新增车辆保养
export function addCarMaintain(data) {
  return request({
    url: '/system/carMaintain',
    method: 'post',
    data: data
  })
}

// 修改车辆保养
export function updateCarMaintain(data) {
  return request({
    url: '/system/carMaintain',
    method: 'put',
    data: data
  })
}

// 删除车辆保养
export function delCarMaintain(id) {
  return request({
    url: '/system/carMaintain/' + id,
    method: 'delete'
  })
}
